<template>
  <div class="scorll-outbox">
    <vue-seamless-scroll :data="lists" class="auto-scorll-table" :class-option="defaultOption">
      <div class="scorll-list" v-for="(item,index) in lists" :key='index' ref='list'>
        <span class="scorll-uname">{{item.noticeContent}}</span>
      </div>
    </vue-seamless-scroll>
  </div>
</template>

<script>
import vueSeamlessScroll from 'vue-seamless-scroll'

export default {
  name: 'myMarqueeLeft',
  components: {vueSeamlessScroll},
  props: {
    lists: {
      type: Array,
      default: []
    }
  },
  data() {
    return {}
  },
  mounted() {

  },
  computed: {
    defaultOption() {
      return {
        step: 0.5, // 数值越大速度滚动越快
        limitMoveNum: 1, // 开始无缝滚动的数据量 this.list.length
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 2, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1 这里要变成你的一行表格的高度 可以审查元素
        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
        waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
  .scorll-outbox {
    overflow: hidden;
    height: 35px;

    .auto-scorll-table {
      overflow: hidden;
      white-space: nowrap;
    }

    .scorll-list {
      margin-right: 100px;
      display: inline-block;
      font-size: 14px;
      line-height: 35px;
      overflow: hidden;

      .scorll-uname {
        /*color: #20c6fb;*/
      }
    }
  }
</style>